package ice4j.server;

import ice4j.Transport;
import ice4j.TransportAddress;
import ice4j.ice.harvest.TurnCandidateHarvester;
import junit.framework.TestCase;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.logging.Logger;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-08-29 17:43
 * @Description:
 */
public class Server extends TestCase {

    private static final Logger logger = Logger.getLogger(Server.class.getName());

    public static void main(String[] args) throws IOException {

//        int singlePort = 18912;
//
//        List<SinglePortUdpHarvester> singlePortUdpHarvesters
//                = SinglePortUdpHarvester.createHarvesters(singlePort);
//
//        int i = 0;
//        for (SinglePortUdpHarvester singlePortUdpHarvester : singlePortUdpHarvesters) {
//            // System.out.println(" [" + i++ + "] ==> " + singlePortUdpHarvester.isHostHarvester());
//
//        }
//
//        System.out.println("length ==> " + singlePortUdpHarvesters.size());

        turnServer();

        while (true);
    }

    public static void turnServer() {

        TransportAddress transportAddress = new TransportAddress(new InetSocketAddress(18912), Transport.UDP);

        TurnCandidateHarvester turnCandidateHarvester = new TurnCandidateHarvester(transportAddress);

    }
}
